package com.ruoyi.dynamic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.dynamic.model.pojo.entity.LuckyBag;
import com.ruoyi.dynamic.model.pojo.entity.LuckyBagUser;
import com.ruoyi.dynamic.model.pojo.request.app.*;
import com.ruoyi.dynamic.model.pojo.request.crm.CrmLuckBagCheckRequest;
import com.ruoyi.dynamic.model.pojo.result.app.AppLuckyBagInfoResult;

/**
 * <p>
 * 福袋 服务类
 * </p>
 *
 * @author ${author}
 * @since 2024-11-28
 */
public interface ILuckyBagService extends IService<LuckyBag> {

    /**
     * 发布福袋
     */
    boolean release(AppCreateLuckBagRequest request, Long userId);


    Long verify(Long roomId, Long userId);

    /**
     * 审核福袋
     */
    LuckyBag verifyById(Long id);


    /**
     * 审核福袋
     */
    boolean check(CrmLuckBagCheckRequest request);

    /**
     * 详情
     */
    AppLuckyBagInfoResult info(Long id, Long userId);


    /**
     * 检验用户是否达成此福袋
     *
     * @param luckyBag
     * @return
     */
    Integer isReachByUserId(LuckyBag luckyBag);

    /**
     * 福袋弹幕参与
     */
    boolean comment(AppLuckyBagCommentRequest request, Long userId);

    /**
     * 参与人员
     */
    Pages<LuckyBagUser> userListPage(AppLuckyBagUserSearchRequest request);


    /**
     * 保存模板
     */
    boolean saveTem(AppRoomVoteMusicTemRequest request, Long userId);

    /**
     * 福袋列表搜索
     */
    Pages<AppLuckyBagInfoResult> listPage(AppLuckBagSearchRequest request, Long userId);

    /**
     * 编辑福袋
     */
    boolean updateLuck(AppCreateLuckBagRequest request, Long userId);


    /**
     * 福袋结束
     */
    void over(String replace, Integer feng);

    /**
     * 是否达成条件
     */
    boolean isReachByUser(Long id, Long userId, Long roomId);

}
